﻿namespace KeRui.Common
{
    using System;

    public class OperFactory
    {
        public IOper CreateOper(string Oper)
        {
            if (Oper.Equals("+"))
            {
                return new OperAdd();
            }
            if (Oper.Equals("-"))
            {
                return new OperDec();
            }
            if (Oper.Equals("*"))
            {
                return new OperRide();
            }
            if (Oper.Equals("/"))
            {
                return new OperDiv();
            }
            return null;
        }
    }
}

